import java.util.ArrayList;


public class Section {
	protected int maxVehicles;
	protected String description;
	protected double distance;
	protected Metric metric;
	protected String name;
	
	public Section (String name, double distance, int maxVehicles, Metric metric, String description) {
		this.name = name;
		this.distance = distance;
		this.maxVehicles = maxVehicles;
		this.metric = metric;
		this.description = description;
	}
	
	/**
	 * Accessor Method (Name)
	 * @return	The name of the Road associated with the section.
	 */
	public String getName() {
		return name;
	}
	
	/**
	 * Accessor Method (Distance)
	 * @return	The distance of the road section.
	 */
	public double getDistance() {
		return distance;
	}
	
	/**
	 * Accessor Method (Description)
	 * @return	The description of the road section.
	 */
	public String getDescription() {
		return description;
	}
	
	/**
	 * Adds a vehicle in either the north or south bound direction.
	 * Checks to see if traffic has not exceeded maxVehicles.
	 * @param vehicle 		The vehicle to be added.
	 * @param direction 	The direction in which to add the vehicle.
	 * @return True/false if vehicle could be added.
	 */
	public boolean addVehicle(Vehicle vehicle, Direction direction) {
		/**
		 * Implemented in subclasses!
		 */
		return false;
	}

	public boolean addVehiclewithoutMax(Vehicle vehicle, Direction direction) {
		/**
		 * Implemented in subclasses!
		 */
		return false;
	}
	/**
	 * Removes a vehicle from either the north or south bound direction.
	 * @param vehicle 		The vehicle to be removed.
	 * @param direction 	The direction in which to remove the vehicle.
	 * @return True/false if vehicle could be removed.
	 */
	public boolean removeVehicle(Vehicle vehicle, Direction direction) {
		/**
		 * Implemented in subclasses!
		 */
		return false;
	}
	
	/**
	 * Returns the list of intersections for a section
	 * @return
	 */
	public ArrayList<Intersection> getIntersections() {
		/**
		 * Implemented in subclasses!
		 */
		return null;
	}
	
	/**
	 * Returns the next intersection for a given section in a particular direction
	 * @param direction
	 * @return
	 */
	public Intersection nextIntersection(Direction direction) {
		/**
		 * Implemented in subclasses!
		 */
		return null;
	}
	
	/**
	 * Returns the weight for the current section 
	 * @param direction
	 * @return
	 */
	public double getWeight(Direction direction) {
		return 0;
	}
	
	public int getSize(Direction dir){
		return 0;
	}
	
	public int getMaxVehicles(){
		return maxVehicles;
	}
}
